JFLAGS = -g -encoding ISO8859_1
JC = javac
JVM= java
FILE=
.SUFFIXES: .java .class
.java.class:
	$(JC) $(JFLAGS) $*.java

CLASSES = \
		ActivateMenuListener.java \
		AttachableElement.java \
		Ball.java \
		ConfigurationMenuListener.java \
		Drawable.java \
		FixedHook.java \
		GBall.java \
		GFixedHook.java \
		GRubber.java \
		GSpring.java \
		MouseListener.java \
		MyWorld.java \
		PhysicsElement.java \
		PhysicsLab.java \
		PhysicsLabPanel.java \
		Rubber.java \
		Spring.java \
		Vector2D.java \
		WorldControlMenuListener.java

MAIN = PhysicsLab

default: classes

classes: $(CLASSES:.java=.class)

run: $(MAIN).class 
	$(JVM) $(MAIN) $(FILE)

clean:
	$(RM) *.class

doc: 
	mkdir documentation
	javadoc -charset "iso-8859-1" -docencoding "ISO-8859-1" -encoding ISO-8859-1 -d documentation *.java
